
public class MazeGameP2P {
	/**
	 * 
	 * @param args
	 * 
	 */
	public static void main(String[] args) {
		String host;
		int port;
		int n, m;
		MazePeer mp;
		if (args.length == 2) {
			n = Integer.parseInt(args[0]);
			m = Integer.parseInt(args[1]);
			mp = new MazePrimaryServer(n, m);
			mp.play();
		} else if (args.length == 4){
			n = Integer.parseInt(args[0]);
			m = Integer.parseInt(args[1]);
			host = args[2];
			port = Integer.parseInt(args[3]);
			mp = new MazePeer(host, port);
			mp.play();
		} else {
			System.out.println("Usage:");
			System.out.println("MazeGameP2P [n] [m] [priHost] [priPort]");
			System.exit(0);
		}
	}

}
